using Microsoft.Practices.Composite.Events;
using Navigator.Interfaces;
using Common.Events;

namespace Navigator.ViewModel.Services
{
    public static class CommandServices
    {
        public static void ShowWorkspace(string workspaceName, INavigatorViewModel viewModel)
        {
            var eventAggregator = viewModel.Container.Resolve<IEventAggregator>();
            var viewRequestedEvent = eventAggregator.GetEvent<ViewRequestedEvent>();
            viewRequestedEvent.Publish(workspaceName);

            viewModel.ActiveWorkspace = workspaceName;
        }
        
    }
}